package com.gitee.starblues.cloud.nacos.controller;

import com.gitee.starblues.cloud.nacos.TestFeignService;
import com.gitee.starblues.cloud.nacos.config.NacosConfigExample;
import com.gitee.starblues.core.PluginInfo;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author starBlues
 * @version 1.0
 */
@RestController
@RequestMapping("nacos-config")
@Api(tags = "nacos-plugin-config")
public class NacosConfigController {

    @Autowired
    private NacosConfigExample configExample;

    @Autowired
    private TestFeignService testFeignService;

    @GetMapping("/config")
    public NacosConfigExample getConfig() {
        return configExample;
    }

    @GetMapping("/feign")
    public String getFeign(@RequestParam("name") String name) {
        return testFeignService.hello(name);
    }

}
